/*
 * Copyright (c) 2018 maoyan.com
 * All rights reserved.
 *
 */
package com.darren.euc.repository;

import com.darren.euc.entity.Notice;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * 在这里编写类的功能描述
 *
 * @author fangwenhao
 * @created 2018/3/14
 */
public interface NoticeRepository extends JpaRepository<Notice,Long>{

    List<Notice> findTop2ByIsDeletedNotAndStatusAndUserAreaIdInOrderByAddTimeDesc(Integer isdeleted, Integer status, List<Long> spaceIds);

    Page<Notice> findByIsDeletedNotAndStatusAndUserAreaIdInOrderByAddTimeDesc(Integer isdeleted, Integer status, List<Long> spaceIds, Pageable pageable);

}
